<%@page import="tjut.opp.DepartmentEntity"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<script src="js/bootstrap.js" type="text/javascript"></script>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.css.map" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link href="css/bootstrap-theme.css.map" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
  List lstDept= new ArrayList();
  DepartmentEntity dept1=new DepartmentEntity();
  dept1.setDepartment_id(13);
  dept1.setDepartment_name("销售部");
  dept1.setManager_id(102);
  lstDept.add(dept1);
  DepartmentEntity dept2=new DepartmentEntity();
  dept2.setDepartment_id(14);
  dept2.setDepartment_name("开发部");
  dept2.setManager_id(103);
  lstDept.add(dept2);
  DepartmentEntity dept3=new DepartmentEntity();
  dept3.setDepartment_id(15);
  dept3.setDepartment_name("运维部");
  dept3.setManager_id(101);
  lstDept.add(dept3);
  DepartmentEntity dept4=new DepartmentEntity();
  dept4.setDepartment_id(16);
  dept4.setDepartment_name("后勤部");
  dept4.setManager_id(104);
  lstDept.add(dept4);
  //session.setAttribute("deptprint", lstDept);
  request.setAttribute("deptprint", lstDept);
%>
<table class="table table-hover "  width="340" border="1" cellpadding="1" cellspacing="0">

<thead align="center">
<tr >
	<td>序号</td>
	<td>部门ID</td>
	<td>部门名称</td>
	<td>管理ID</td>
</tr>
</thead>
<tbody align="center">
 <c:forEach items="${requestScope.deptprint}" var="eachvalue" varStatus="statu" >
<tr >
<td class="warning">${statu.index + 1 }</td>
<td class="success"><c:out value="${eachvalue.department_id }"></c:out></td>
<td class="info"><c:out value="${eachvalue.department_name }"></c:out></td>
<td class="active"><c:out value="${eachvalue.manager_id }"></c:out></td>
</tr>
</c:forEach>
</tbody>
</table>

<%-- <c:forEach items="${requestScope.deptprint}" var="eachvalue" varStatus="statu" >
<c:out value="${statu.index + 1 }"></c:out>
<c:out value="${eachvalue.department_id }"></c:out>
<c:out value="${eachvalue.department_name }"></c:out>
<c:out value="${eachvalue.manager_id }"></c:out><br>
</c:forEach> --%>


</body>
</html>